package com.example.mqlearning;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.env.Environment;

@SpringBootApplication
public class MqLearningApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(MqLearningApplication.class, args);
        Environment env = context.getEnvironment();
        String port = env.getProperty("server.port", "8080");
        System.out.println("\nSwagger文档地址：http://localhost:" + port + "/swagger-ui/index.html");
    }
}